package com.spzx.channel.controller;

import com.spzx.channel.service.IndexService;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Tag(name = "首页数据管理")
@RestController
@RequestMapping("index")
public class indexController {

    @Autowired
    private IndexService indexService;


    @Operation(summary = "展示首页数据")
    @GetMapping
    public AjaxResult index(){
        Map<String,Object> map=indexService.getIndexData();
        return AjaxResult.success(map);
    }

}
